﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FisheryPlatform.Common
{
    public class RandomUtility
    {
        /// <summary>
        /// 生成验证码
        /// </summary>
        /// <returns></returns>
        public static string ValidateCode()
        {
            #region
            string code = "";
            string[] lst = new string[]{
              "2","3","4","5","6","7","8","9","A","B","C","D","E","F","G",
               "H","J","K","M","N","P","Q","R","S","T","U","V","W",
               "X","Y","Z"};
            Random random = new Random();
            for (int i = 0; i < 4; i++)
            {
                code += lst[random.Next(0, lst.Length)];
            }

            return code;
            #endregion
        }
    }
}
